home *** CD-ROM | disk | FTP | other *** search
- include "hjglobal.jsh"
- Include "hjconst.jsh" ; default HJ constants
-
- Globals
- int LPMFirstTime
-
- Function FocusChangedEvent ()
- Var
- int safety,
- int verbosity
- Let safety = 0
- Let verbosity = GetVerbosity ()
- If GetControlID (GetFocus ()) == 1020 && verbosity !=2 then
- While verbosity != 2 && safety < 2
- VerbosityLevel ()
- Let safety = safety + 1
- Endwhile
- Elif GetControlID (GetFocus ()) != 1020 && verbosity !=0 then
- While verbosity != 0 && safety < 2
- VerbosityLevel ()
- Let safety = safety + 1
- Endwhile
- Endif
- If GetControlID (GetFocus ()) == 1034 then
- {alt+SpaceBar}
- {x}
- SayAll ()
- Return
- Endif
- If GetControlID (GetFocus ()) == 1042 then
- {alt+SpaceBar}
- {x}
- Endif
- If GetControlID (GetFocus ()) == 1020 then
- While verbosity != 2 && safety < 2
- VerbosityLevel ()
- Let safety = safety + 1
- Endwhile
- ;SayWindowTypeAndText (GetParent (GetFocus ()))
- Endif
- If DialogActive () && GetControlID (GetFocus ()) == 6 then
- SayString (GetDialogStaticText ())
- Elif DialogActive () && GetControlID (GetFocus ()) == 2 then
- SayString (GetDialogStaticText ())
- Endif
- If GetControlID (GetFocus ()) == 1123 then
- SaveCursor ()
- InvisibleCursor ()
- SaveCursor ()
- RouteInvisibleToPc ()
- JAWSHome ()
- NextLine ()
- SayLine ()
- NextLine ()
- SayLine ()
- NextLine ()
- SayLine ()
- Endif
- SayWindowTypeAndText (GetFocus ())
- Return
- EndFunction
-
- Script ReadFromField ()
- If DialogActive () then
- SayWindowTypeAndText (GetFocus ())
- Return
- Elif MenusActive () then
- SayChunk ()
- Return
- Elif GetControlID (GetFocus ()) == 1034 then
- SaveCursor ()
- InvisibleCursor ()
- SaveCursor ()
- RouteInvisibleToPc ()
- JAWSPageUp ()
- JAWSHome ()
- NextLine ()
- NextLine ()
- NextLine ()
- SayLine ()
- RestoreCursor ()
- RestoreCursor ()
- Endif
- EndScript
-
- Script ReadDateField ()
- If DialogActive () then
- SayWindowTypeAndText (GetFocus ())
- Return
- Elif MenusActive () then
- SayChunk ()
- Return
- Elif GetControlID (GetFocus ()) == 1034 then
- SaveCursor ()
- InvisibleCursor ()
- SaveCursor ()
- RouteInvisibleToPc ()
- JAWSPageUp ()
- JAWSHome ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- SayLine ()
- RestoreCursor ()
- RestoreCursor ()
- Endif
- EndScript
-
- Script ReadToField ()
- If DialogActive () then
- SayWindowTypeAndText (GetFocus ())
- Return
- Elif MenusActive () then
- SayChunk ()
- Return
- Elif GetControlID (GetFocus ()) == 1034 then
- SaveCursor ()
- InvisibleCursor ()
- SaveCursor ()
- RouteInvisibleToPc ()
- JAWSPageUp ()
- JAWSHome ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- SayLine ()
- RestoreCursor ()
- RestoreCursor ()
- Endif
- EndScript
-
- Script ReadCCField ()
- If DialogActive () then
- SayWindowTypeAndText (GetFocus ())
- Return
- Elif MenusActive () then
- SayChunk ()
- Return
- Elif GetControlID (GetFocus ()) == 1034 then
- SaveCursor ()
- InvisibleCursor ()
- SaveCursor ()
- RouteInvisibleToPc ()
- JAWSPageUp ()
- JAWSHome ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- SayLine ()
- RestoreCursor ()
- RestoreCursor ()
- Endif
- EndScript
-
- Script ReadSubjectField ()
- If DialogActive () then
- SayWindowTypeAndText (GetFocus ())
- Return
- Elif MenusActive () then
- SayChunk ()
- Return
- Elif GetControlID (GetFocus ()) == 1034 then
- SaveCursor ()
- InvisibleCursor ()
- SaveCursor ()
- RouteInvisibleToPc ()
- JAWSPageUp ()
- JAWSHome ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- SayLine ()
- RestoreCursor ()
- RestoreCursor ()
- Endif
- EndScript
-
- Script NextLine ()
- If GetControlID (GetFocus ()) == 1020 && GetActiveCursor () == "1" && MenusActive () == "INACTIVE" then
- NextLine ()
- SayWindowTypeAndText (GetFocus ())
- Return
- Endif
- NextLine ()
- SayLine ()
- EndScript
-
- Script PriorLine ()
- If GetControlID (GetFocus ()) == 1020 && GetActiveCursor () == "1" && MenusActive () == "INACTIVE" then
- PriorLine ()
- SayWindowTypeAndText (GetFocus ())
- Return
- Endif
- PriorLine ()
- SayLine ()
- EndScript
-
- Script CTRLHomePress ()
- If GetControlID (GetFocus ()) == 1034 && GetActiveCursor () == 1 then
- SpeechOff ()
- {ctrl+home}
- Delay (1)
- SpeechOn ()
- SayString ("Top of file")
- SayWindowTypeAndText (GetFocus ())
- Endif
- Return
- EndScript
-
- Script CTRLEndPress ()
- If GetControlID (GetFocus ()) == 1034 && GetActiveCursor () == 1 then
- SpeechOff ()
- {ctrl+end}
- Delay (1)
- SpeechOn ()
- SayString ("Bottom of file")
- SayWindowTypeAndText (GetFocus ())
- Endif
- Return
- EndScript
-
- Script HomeKeyPress ()
- If GetControlID (GetFocus ()) == 1020 then
- SpeechOff ()
- {home}
- Delay (1)
- SpeechOn ()
- SayWindowTypeAndText (GetFocus ())
- Else
- SayString ("Home")
- {home}
- Endif
- Return
- EndScript
-
- Script EndKeyPress ()
- If GetControlID (GetFocus ()) == 1020 then
- SpeechOff ()
- {end}
- Delay (1)
- SpeechOn ()
- SayWindowTypeAndText (GetFocus ())
- Else
- SayString ("End")
- {end}
- Endif
- Return
- EndScript
-
- Script SayLine ()
- Var
- int safety,
- int verbosity
- Let safety = 0
- Let verbosity = GetVerbosity ()
- If GetActiveCursor () == 1 && GetControlID (GetFocus ()) == 1020 then
- While verbosity != 2 && safety < 2
- VerbosityLevel ()
- Let safety = safety + 1
- Endwhile
- SayWindowTypeAndText (GetFocus ())
- Else
- SayLine ()
- Endif
- Return
- EndScript
-
- Script HotKeyHelp ()
- if (JAWSHotKeys()) then
- return
- endif
- SayString ("Hotkeys for use with PopMail:" )
- SayString ("Press F2 or ALT+W to compose a new message")
- SayString ("Press F4 or ALT+G to get new mail")
- SayString ("Press ALT+R to reply to a message")
- SayString ("Press ALT+O to forward a message")
- SayString ("Press ALT+N to send a message")
- SayString ("Press F6 or ALT+D to shread (delete) a message")
- SayString ("Press ALT+U to move to the previous message")
- SayString ("Press ALT+X to move to the next message")
- SayString ("Press ALT+1 to read the From Field for a message")
- SayString ("Press ALT+2 to read the Date Field for a message")
- SayString ("Press ALT+3 to read the To Field for a message")
- SayString ("Press ALT+4 to read the CC Field for a message")
- SayString ("Press ALT+5 to read the Subject Field for a message")
- SayString ("Press CTRL+M to maximize the messages list box")
- EndScript
-
- Script PrintButtonPress ()
- If GetControlID (GetFocus ()) == 1034 then
- {alt+f}
- {p}
- Else
- SayString ("You are not in a message")
- Endif
- EndScript
-
- Script UpButtonPress ()
- Var
- string wn1,
- string wn2,
- string ml1,
- String ml2
- If DialogActive () then
- SayWindowTypeAndText (GetFocus ())
- Return
- Elif MenusActive () then
- SayChunk ()
- Return
- Elif GetControlID (GetFocus ()) == 1034 then
- Let wn1 = GetWindowName (GetParent (GetFocus ()))
- SpeechOff ()
- PcCursor ()
- {control+home}
- Let ml1 = GetLine ()
- {alt+u}
- Pause ()
- Let wn2 = GetWindowName (GetParent (GetFocus ()))
- PcCursor ()
- {control+home}
- Let ml2 = GetLine ()
- SpeechOn ()
- If ml2 != ml1 | wn1 != wn2 then
- ;Read subject field
- SaveCursor ()
- InvisibleCursor ()
- SaveCursor ()
- RouteInvisibleToPc ()
- JAWSPageUp ()
- JAWSHome ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- SayLine ()
- RestoreCursor ()
- RestoreCursor ()
- ;Read from field
- SaveCursor ()
- InvisibleCursor ()
- SaveCursor ()
- RouteInvisibleToPc ()
- JAWSPageUp ()
- JAWSHome ()
- NextLine ()
- NextLine ()
- NextLine ()
- SayLine ()
- RestoreCursor ()
- RestoreCursor ()
- SayAll ()
- Else
- SayString ("No More Messages")
- Endif
- Endif
- EndScript
-
- Script NextButtonPress ()
- Var
- string wn1,
- string wn2,
- string ml1,
- string ml2
- If DialogActive () then
- SayWindowTypeAndText (GetFocus ())
- Return
- Elif MenusActive () then
- SayChunk ()
- Return
- Elif GetControlID (GetFocus ()) == 1034 then
- Let wn1 = GetWindowName (GetParent (GetFocus ()))
- SpeechOff ()
- PcCursor ()
- {control+home}
- Let ml1 = GetLine ()
- {alt+x}
- Pause ()
- Let wn2 = GetWindowName (GetParent (GetFocus ()))
- PcCursor ()
- {control+home}
- Let ml2 = GetLine ()
- SpeechOn ()
- If ml1 != ml2 | wn1 != wn2 then
- ;Read subject field
- SaveCursor ()
- InvisibleCursor ()
- SaveCursor ()
- RouteInvisibleToPc ()
- JAWSPageUp ()
- JAWSHome ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- NextLine ()
- SayLine ()
- RestoreCursor ()
- RestoreCursor ()
- ;Read from field
- SaveCursor ()
- InvisibleCursor ()
- SaveCursor ()
- RouteInvisibleToPc ()
- JAWSPageUp ()
- JAWSHome ()
- NextLine ()
- NextLine ()
- NextLine ()
- SayLine ()
- RestoreCursor ()
- RestoreCursor ()
- SayAll ()
- Else
- SayString ("No More Messages")
- Endif
- Endif
- EndScript
-
- Script ScriptAndAppNames ()
- ScriptAndAppNames ("WS_POPmail (lab version)")
- EndScript
-
- Function AutoStartEvent ()
- If LPMFirstTime == 0 then
- Let LPMFirstTime = 1
- SayString (GetAppTitle ())
- SayString ("Press Insert+H for help with Lab POPmail hotkeys")
- Endif
- Return
- EndFunction
-
- Function AutoFinishEvent ()
- Let LPMFirstTime = 0
- EndFunction
-
- Script MaximizeMessageWindow ()
- ActivateMenuBar ()
- {leftarrow}
- {x}
- EndScript
-